package cn.cdeden.resource.domain.bo;

import cn.cdeden.common.core.validate.AddGroup;
import cn.cdeden.common.core.validate.EditGroup;
import cn.cdeden.resource.domain.SysOssDownloadRecord;
import cn.cdeden.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.*;
import jakarta.validation.constraints.*;

/**
 * 文件下载记录业务对象 sys_oss_download_record
 *
 * @author Yu.
 * @date 2024-12-08
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysOssDownloadRecord.class, reverseConvertGenerate = false)
public class SysOssDownloadRecordBo extends BaseEntity {

    /**
     * 编号
     */
    @NotNull(message = "编号不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 存储的文件编号
     */
    @NotBlank(message = "存储的文件编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String ossId;

    /**
     * 文件库编号
     */
    @NotBlank(message = "文件库编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fileId;

    /**
     * 文件版本号
     */
    @NotBlank(message = "文件版本号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String versionId;

    /**
     * 文件版
     */
    @NotBlank(message = "文件版不能为空", groups = { AddGroup.class, EditGroup.class })
    private String versionName;

    /**
     * 文件名
     */
    @NotBlank(message = "文件名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 文件类型
     */
    @NotBlank(message = "文件类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fileType;

    /**
     * 库的类型
     */
    @NotBlank(message = "库的类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String moduleType;

    /**
     * 下载生身份
     */
    @NotBlank(message = "下载生身份不能为空", groups = { AddGroup.class, EditGroup.class })
    private String identity;

    /**
     * 链接ip
     */
    @NotBlank(message = "链接ip不能为空", groups = { AddGroup.class, EditGroup.class })
    private String loginIp;

    /**
     * 登录位置
     */
    @NotBlank(message = "登录位置不能为空", groups = { AddGroup.class, EditGroup.class })
    private String address;

    /**
     * 浏览器
     */
    @NotBlank(message = "浏览器不能为空", groups = { AddGroup.class, EditGroup.class })
    private String browser;

    /**
     * 下载设备
     */
    @NotBlank(message = "下载设备不能为空", groups = { AddGroup.class, EditGroup.class })
    private String equipment;


}
